package com.yc.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yc.enums.StatusEnum;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BaseSimpleEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = 1702086455010811881L;
    private Long id;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableLogic
    @JsonIgnore
    @TableField("deleted")
    private Integer deleted = 0;

    @TableField("status")
    private StatusEnum status = StatusEnum.NORMAL;
}
